package br.com.android;

import android.app.Activity;
import android.os.Bundle;
import br.com.android.entity.ClienteEntity;
import br.com.android.objeto.Cliente;

public class DroiddabaseActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        try {
        	Cliente c = new Cliente();
        	c.setId(12);
        	c.setNome("Teste");
        	c.setEmail("teste@gmail.com");
        	c.setEndereco("endereco");
        	c.setIdade(14);
        	c.setTelefone(12345678);
			ClienteEntity clienteEntity = new ClienteEntity(this, "TESTE");
			clienteEntity.onCreate();
			clienteEntity.save(c);
		} catch (Exception e) {
			e.printStackTrace();
		}
    }
}